<%-- 
    Document   : nuevoContElectricidad
    Created on : 09-jul-2009, 12:37:35
    Author     : Alejandro
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="domain.*, planner.*,java.util.Iterator"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DOMECO</title>

           <style type="text/css">@import url(./js/calendar-blue2.css);</style>
        <script type="text/javascript" src="./js/calendar.js"></script>
        <script type="text/javascript" src="./js/calendar-es.js"></script>
        <script type="text/javascript" src="./js/calendar-setup.js"></script>

        <script type="text/javascript">
//inicializo el calendario
window.onload = function() {
  Calendar.setup({
    inputField: "fecha",
    ifFormat:  "%Y-%m-%d",
    button:     "mas"
  });

}
</script>

    </head>
    <body>

        <%if (request.getSession(false) != null) {%>
        <table align="center" width="1000" border="0">
            <tr>
                <td>
                    <div id="menu" align="center"><jsp:include page="./menu principal.jsp"></jsp:include></div>
                    <br>
                    <p id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Electricidad</span><br></p>
                    <span id="azul"> Nuevo Contrato de Electricidad</span>
                    <div id="general">

                        

                        <div id="cuenta" align="right">

                            <form name="introducirCuenta" action="./Register?type=electricityCont&redir=E" method="post">
                                <table>
                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Cuenta:</span></td>
                                        <td><select name="bank" id="bank">
                                                <%
                                                Userdom u = (Userdom) request.getSession().getAttribute("user");
                                                Iterator it = new Operations().getBankaccountsList(u).iterator();
                                                while (it.hasNext()) {
                                                    Bankaccount b = (Bankaccount) it.next();

                                                %>
                                                <option  value="<% out.print(b.getIdBank());%>"><% out.print(b.getName());%></option>

                                                <%
    }
                                                %>
                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Nombre del Contrato:</span></td>
                                        <td><input name="name" type="text" value=""/></td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Compañía:</span></td>
                                        <td><input name="compania" type="text" value="" id="data"/></td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Fecha del Contrato:</span></td>
                                        <td><input name="fecha" type="text" value="" id="fecha" readonly="readonly"/></td>
                                        <td><button name="mas" id="mas" class="mas"></button></td>
                                    </tr>


                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Potencia Contratada: </span></td>
                                        <td><input name="potencia" type="text" value=""/></td>
                                    </tr>


                                     <tr>
                                        <td><br></td>
                                    </tr>



                                    <tr align="center">

                                        <td><input name="aceptar" type="submit" value="" id="aceptar"></td>
                                        <td><input type="button" value="" id="atras" onclick="javascript:history.back();"></td>
                                    </tr>

                                </table>


<br><br><br><br><br>






                            </form>

                        </div>
                        <br>
                    </div>
<br>
                    <div id="abajo" align="center"><p>&copy;   Domeco &mdash; Proyecto Informático A&ntilde;o 2009 </p></div>
                </td>
            </tr>
        </table>
        <%} else {%>
        <jsp:forward page="./index.jsp"></jsp:forward>
        <%}%>
    </body>
</html>
